package com.businesswebsite.businesswebsite.FormalWebExplot.Dao.User;

import com.businesswebsite.businesswebsite.FormalWebExplot.Entity.CompanyUser;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.sql.Timestamp;

@Mapper //mapper类
@Repository //把DAO交给spring容器
public interface CompanyUserDao {
//    登录
    CompanyUser Login(@Param("user_account")String user_account,@Param("password") String password);
//    注册
    Integer Register(CompanyUser companyUser);
//    修改
    Integer Update(CompanyUser companyUser);
//    查询用户 根据 账户密码
    CompanyUser SelectByAccount(@Param("user_account")String user_account);
//    记录上一次登陆时间
    Integer UpdateLastLoginTime(@Param("user_account")String user_account,@Param("last_login_time") Timestamp last_login_time);
//    注销用户
    Integer Delete(@Param("user_account")String user_account);

}
